/*
CREATE TABLE "sys_user" (
  "sequence_nbr" integer(20) NOT NULL,
  "agency_code" text(64),
  "product_code" text(64),
  "username" text(64) NOT NULL,
  "password" text(255),
  "salt" text(255),
  "phone" text(20),
  "avatar" text(255),
  "dept_id" text(32),
  "lock_flag" text(1),
  "del_flag" text(1),
  "wx_openid" text(32),
  "mini_openid" text(32),
  "qq_openid" text(32),
  "xili_openid" text(32),
  "tenant_id" integer(11) NOT NULL,
  "is_full" integer(2) NOT NULL,
  "agency_type" text(64),
  "rec_user_code" text(32),
  "rec_date" integer(20),
  "rec_status" text(4),
  "extend1" text(255),
  "extend2" text(255),
  "extend3" text(255),
  "description" text(255),
  PRIMARY KEY ("sequence_nbr")
);
*/

use rbatis::crud;
use serde::{Deserialize, Serialize};

#[derive(Debug, Serialize, Deserialize)]
pub struct SysUser {
    pub sequence_nbr: String,
    pub agency_code: Option<String>,
    pub product_code: Option<String>,
    pub username: String,
    pub password: Option<String>,
    pub salt: Option<String>,
    pub phone: Option<String>,
    pub avatar: Option<String>,
    pub dept_id: Option<String>,
    pub lock_flag: Option<String>,
    pub del_flag: Option<String>,
    pub wx_openid: Option<String>,
    pub mini_openid: Option<String>,
    pub qq_openid: Option<String>,
    pub xili_openid: Option<String>,
    pub tenant_id: Option<i32>,
    pub is_full: Option<i32>,
    pub agency_type: Option<String>,
    pub rec_user_code: Option<String>,
    pub rec_status: Option<String>,
    pub rec_date: Option<String>,
    pub extend1: Option<String>,
    pub extend2: Option<String>,
    pub extend3: Option<String>,
    pub description: Option<String>,
}
crud!(SysUser {}, "sys_user");
